package org.example.projecttwo.entity.news;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.FieldFill;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 新闻统计数据表
 * </p>
 *
 * @author nn
 * @since 2025-11-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("news_statistics")
@Schema(name="NewsStatistics对象", description="新闻统计数据表")
public class NewsStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "新闻ID")
    @TableId(value = "news_id", type = IdType.ASSIGN_ID)
    private Long newsId;

    @Schema(description = "浏览量")
    @TableField("view_count")
    private Integer viewCount;

    @Schema(description = "点赞数")
    @TableField("like_count")
    private Integer likeCount;

    @Schema(description = "收藏数")
    @TableField("collect_count")
    private Integer collectCount;

    @Schema(description = "评论总数")
    @TableField("comment_count")
    private Integer commentCount;

    @Schema(description = "被举报次数")
    @TableField("reported_count")
    private Integer reportedCount;

    @Schema(description = "最后统计更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;


}